home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer: Getting Started / Internet Surfer - Getting Started (Wayzata Technology)(7231)(1995).bin / pc / mac / bonus / peter_le / finger_1 / finger_d.ocu < prev    next >
Text File  |  1993-07-29  |  22KB  |  325 lines

  1. Finger v1.3.7 & Fingerd v1.3.7 ⌐ Peter Lewis, 1991-1993.
  2. These programs are Shareware.
  3.  
  4. Ñ Contents
  5.  
  6.       What Finger/Fingerd Does
  7.       Using Finger/Fingerd
  8.       The Plan File
  9.       How It Works
  10.       Limitations
  11.       Small Print
  12.       Warranty
  13.       Fine Print
  14.       Version History
  15.       Acknowledgements
  16.       The Author
  17.  
  18. Ñ What Finger/Fingerd Does
  19.  
  20. Finger&Fingerd are a Macintosh implementation of the Un*x Finger protocol.
  21.  
  22. Fingerd is a background only application that allows a Mac running MacTCP to be fingered from anywhere in the world.  When someone fingers you they will receive a text file that you specify.  Fingerd is very small (it takes only 40k of RAM), so you can leave it running all the time.  Finger is an application that allows you to finger anyone in the world, and also has the finger daemon built in.  If you don't enable Finger's daemon you can use the two programs together.  Alternatively you can just leave Finger running all the time with its daemon enabled, though this takes more memory (around 120+k).
  23.  
  24. Ñ Using Finger/Fingerd
  25.  
  26. You must have MacTCP installed in order to use either of these applications.
  27.  
  28. To use Fingerd, simply put it in the startup folder (System 7) or make it a startup application (system 6) (its difficult in System 6, because you have to put all your startup applications in the one folder and use the "Selected Files" option, since a background only application isn't considered to be an "Open application"), put your 'Plan' file in the Preferences folder in the System folder.  The file is initially assumed to be named 'Plan', but you can change its name and location via Finger's preferences command.  Once Fingerd is running, fingering your Mac will return the Plan text file.  You can quit Fingerd by launching Finger, holding down the option key and choosing Quit Both from the menu.  Note that under System 7, the Fingerd icon will still show it as being in use.  This appears to be a bug in System 7's Finder.
  29.  
  30. To use Finger, first launch Finger and choose Finger╔ from the File menu.  Enter the machine name and (optionally) the user name of the person you wish to finger (Note: If you have used unix, you may prefer to type user@machine into either field (and if you do prefer to do this, go ahead, cuz it will work :-)).  You can choose to query either a Finger server or a Whois Server by clicking the Whois checkbox.  Then Click the Finger button.  Finger will add any successful addresses to the Finger hierarchical menu.  You can save this menu by choosing Save Finger Menu from the File menu.  
  31.  
  32. Finger also provides a Finger daemon which you can enable by selecting a Plan file through the Preferences dialog.  To do this, bring up the Preferences dialog by selecting Preferences from the File menu and click the button to select a plan file.  If you are running Fingerd, click the disable Finger's Daemon by clicking the Plan check box (Fingerd will still use the file you have selected).  Click the Save button.  Note that at no time should you have both Fingerd running, and Finger's Daemon enabled.
  33.  
  34. Ñ The Plan File
  35.  
  36. The Plan file is a plain text file that Fingerd (or Finger's daemon) returns when you are fingered.   The plan file can be created by any word processor as long as you save it as "Text Only", or it can be created by TeachText.  A useful extension to the Plan file is the translation of certain tokens into information.  When your Mac is fingered, any of the following tokens in the 'Plan' file are expanded to the appropriate strings.
  37.  
  38. %STARTUP-LONG     Friday, November 15, 1991
  39. %STARTUP-SHORT    11/15/91
  40. %STARTUP-ABBREV   Fri, Nov 15, 1991
  41. %STARTUP-TIME     16:15
  42. %STARTUP-TIMESEC  16:15:16
  43. %CURRENT-LONG     Friday, November 15, 1991
  44. %CURRENT-SHORT    11/15/91
  45. %CURRENT-ABBREV   Fri, Nov 15, 1991
  46. %CURRENT-TIME     16:28
  47. %CURRENT-TIMESEC  16:28:27
  48. %IDLE-TIME        0:00
  49. %IDLE-TIMESEC     0:00:02
  50. %TIMEON-TIME      0:13
  51. %TIMEON-TIMESEC   0:13:11
  52. %FINGERED      <The user name the the fingerer used when fingering you>
  53. %MACHINE       <The Machine name of this Macintosh (System 7 only)>
  54. %OWNER          <The owner (chooser) name of this Macintosh>
  55. %IDLEINWORDS    3 minutes 15 seconds
  56.     %IDLEINWORDS was written in C by Stuart Cheshire.
  57. %MACENVY      <Returns various bits of system information.  See the seperate doc file>
  58.     %MACENVY was written by Quinn.
  59. %"LOG-:Preferences:Fingerd Log"
  60.       Logs the IP number of the fingerer to the specified file (in the System Folder).
  61. %FILES-:Preferences:Files
  62.       Returns the file in the specified folder named by the fingerer as the username.  The username may contain colons (:) to specify folders, but not two colons in a row, so they cannot go back up the folder tree to get at your whole file system (I hope not, anyway).  If the filename is blank, then filename @ will be used instead.  If the specified filename doesn't exist, the filename ? will be used instead.  
  63. %LOOKUP-:Preferences:Lookup
  64.       This will scan the specified file and return any lines containg the words in the fingered name.  You could use this to provide a primitive information server (such as an Email or price data base).
  65. %FORTUNE-:Preferences:Fortune
  66.       Returns a randomly selected fortune from the specified folder.  The format of the fortune file is a sequence of fortunes seperated by a line containing only a hash (#) character.  The file must end with a hash character followed by a return.  For example
  67.  
  68. Fortune line 1
  69. #
  70. Fortune line 2
  71. a two line fortune
  72. #
  73.  
  74. Remember to format your fortunes, files, and the Plan file for an 80 column screen.  Also, the files specified in the %FORTUNE, %FILES and %LOOKUP tokens can themselves contain tokens, so you can create quite complex plans.
  75.  
  76. BTW (By the way), in the last four tokens I have used files in the Preferences folder in the System Folder as examples.  You don't have to restrict yourself to this folder, you could for example use the token %FORTUNE-HardDisk:FortuneFile to specify that the fortune file was named FortuneFile and could be found in the root folder of the hard disk named HardDisk, or to make your entire hard disk named FreeAccess visible on the internet you could put %FILES-FreeAccess.  WARNING: %FILES is a serious security risk, so only use it if you are sure you want to make all files in the specified folder and all its sub-folders visible to the entire networld!
  77.  
  78. Ñ How It Works
  79.  
  80. Fingerd listens to TCP port 79 (the port number is specified in STR# 200).  When it receives a line terminated by a carriage return linefeed pair (on a multiuser machine this line contains the user name) it reads the plan file (from the Preferences folder, the System Folder or Fingerd's folder), translates the tokens and sends it through the port.  It then closes the connection and starts again.  Since only one connection can be open at once (at least for MacTCP pre-v1.1)
  81.  
  82. Note that if the username is the same as the third string in STR# ID 128, Fingerd will quit.  By default this STR# is null, so this option is disabled.
  83.  
  84. The Finger application's built in daemon (if enabled) works exactly like Fingerd.  In addition, if you choose Finger from the File menu, it will ask you for a machine and user name.  It will then attempt to find the machine, open port 79 (or 43 for the Whois Server, both port numbers specified in STR# 300), and send the username to it.  Then it will display whatever information the remote machine returns.
  85.  
  86. Finger & Fingerd translate the incoming and outgoing characters between the Mac's 8-bit characters and the standard network 7-bit character by using the taBL resources.  If you use a non-standard system, you may wish to change these resources.  You can just edit them using ResEdit, or you can edit the "Translate 7<->8" file, and put it in the Preferences folder, so that when you next upgrade Finger (hopefully not next week, but its been a bit that way with 4 releases in a couple months) the translation will stay the same.
  87.  
  88. The tokens in the Plan file are implemented as PROC resources stored in Finger, Fingerd, or the Finger Preferences file.  If you want you can even write your own, the format for them is:
  89.  
  90.     type
  91.         parameterRecord = record
  92.                 fingeredname: stringPtr;        { Input        - finger name }
  93.                 param: stringPtr;                    { Input        - parameter following special }
  94.                 returnvalue: stringPtr;    { Output    - return string, appeneded to finger output.  }
  95.                 fingeroutput: handle;                { Input/Output    - finger output as its built. }
  96.                 hlength: longInt;                    { Input    /Output    -  handle length.  }
  97.                 offset: longInt;    
  98. { Input/Output - offset from start of handle that finger output is up to }
  99.                 idle: longInt;                            { Input        - Idle time in seconds }
  100.                 remoteIP: longInt;                    { Input        - IP number of fingerer }
  101.                 expandtokens: boolean;            { Output    - Expand <cr>s and %tokens inserted into the fingeroutput handle }
  102. { No extra expansion is done for strings.  If you have <cr>s in them, put <cr><lf> instead. }
  103.             end;
  104.  
  105.   procedure Main (var p: parameterRecord); 
  106.  
  107. For example, %CURRENT is defined like this:
  108.     procedure Main (var p: parameterRecord);
  109.         var
  110.             t: longInt;
  111.     begin
  112.         GetDateTime(t);
  113.         UprString(p.param^, false);
  114.         if p.param^ = 'SHORT' then
  115.             IUDateString(t, shortDate, p.returnValue^)
  116.         else if p.param^ = 'LONG' then
  117.             IUDateString(t, longDate, p.returnValue^)
  118.         else if p.param^ = 'ABBREV' then
  119.             IUDateString(t, abbrevDate, p.returnValue^)
  120.         else if p.param^ = 'TIMESEC' then
  121.             IUTimeString(t, true, p.returnValue^)
  122.         else if p.param^ = 'TIME' then
  123.             IUTimeString(t, false, p.returnValue^)
  124.         else
  125.             p.returnValue^ := '?';
  126.     end;
  127.  
  128. To write your own, compile code similar to the above as a Code Resource of type PROC, and ID greater than 1000, with the name you want for your proc (eg, CURRENT for the above example).  Then add the PROC resource to the Finger Preferences file.  If you write any useful PROCs, send them to me (preferably with source code so I can verify they don't do anything nasty) and I'll include them in the next distribution.  I've included the source for all the tokens I've written so far, as well as the THINK Pascal 4 project file for the CURRENT token.
  129.  
  130. Ñ Limitations
  131.  
  132. Finger&Fingerd probably require the 128k ROM and System version 6.0 or higher.  It may well only work with a Mac IIsi (not mine)-:, and System 7.0.  It definitely requires MacTCP, and may well require v1.1 of MacTCP.  Fingerd should require little memory (around 35k), while Finger requires a fair bit (around 120+k).  If Finger runs low on memory it will disable the Finger╔ menu item.  If this happens give it more memory!
  133.  
  134. The incoming plan must be a reasonable size.  I've limited it to 5k or so.  If you finger a machine with lots of users, it may not display all the information returned.  Similarly there is a limit of around 5k on the outgoing plan.  You can change this limit by ResEditing Finger/Fingerd and changing STR#=200.  Finger&Fingerd use MultiFinder temporary memory to store the output plan file, so if you fill up all available memory, your machine will stop answering Finger requests.
  135.  
  136. Ñ Small Print
  137.  
  138. This program is Shareware, which means if you use it, and you'd like me to write more useful things, then you should send me $5 (US or Australian).  For individual registrations, you might as well just send cash, but I can accept checks drawn on US bank accounts without any problem.
  139.  
  140. Site Licensing:
  141. World-wide license: US$500 (or equivalent)
  142. Foreign universities or companies site license: US$150 (or equivalent)
  143. Australian universities or companies site license: AU$150 (none yet)
  144. Curtin University and the University of Western Australia are exempt.
  145. Individuals: AU or US $5 (or equivalent).
  146.  
  147. Note that I'd prefer that you use the program and send me a note saying ╥Hello╙ than not use the program at all (or not say hello)!  So even if you are not willing to send me any money, still drop me a line and say hi!  
  148.  
  149. You may distribute Finger&Fingerd any way you wish as long as you don't charge for it (reasonable download costs such as Compu$erve are ok I guess (although who would call Compu$erve's download costs reasonable?)).  It would probably be a good idea to keep this documentation file with the program, but I'm hardly likely to check up on you now am I!  I don't guarantee any support, but I always answer my Email (I'm not so good with snail-mail and those horrible little bits of paper and such!).  If I don't answer Email its because your message didn't get to me, or my reply bounced (so try again, and include a valid internet address if you can).
  150.  
  151. There is no fee to upgrade to this version, if you registered any previous version, that registration remains valid.
  152.  
  153. I╒ve read through the Guide for Shareware Authors.  According to them, I am doing everything wrong.  I should put a large price tag on my software because the people who pay will pay whether or not I put a large price tag, and the people who won╒t pay, won╒t pay no matter what the price is.  This seems to be to be totally negative reinforcement - I╒d hurt those who do the right thing by me, and have no effect on the rest.  I╒m not going to do that, at least not yet.  So I╒m not going to be able to work on my programs full time, so I guess we all suffer.
  154.  
  155. Ñ Warranty
  156.  
  157. There is absolutely NO warranty, guarantee, hint, suggestion or anything else that would lead anyone to think that Finger or Fingerd do anything stated in this documentation.  It usually does not destroy data (systems, hardware, etc), and has sometimes worked on my Mac with System 7.0.  It is highly unlikely that it will work with older systems (pre 6.0 anyway) (but I did get a report it worked with system 4.something!) or with the 64k ROM.  It might work with the other models, but I don't have them all, so I don't know (Anyone want to give me a IIfx (or one of those new beasts?  How did they come up with such a terrible name???) so I can check for compatibility?).  It might work with previous (or future!) versions of MacTCP (other than 1.1), but who can tell?  If it works on your system (or especially if it doesn't!), send me some Email or a postcard and let me know!
  158.  
  159. Ñ Fine Print
  160.  
  161.       Peter Lewis hereby disclaims all warranties relating to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose.  Does any one really read this stuff.  Peter Lewis will not be liable for any special, incidental, consequential, indirect or similar damages due to loss of data or any other reason, even if Peter Lewis or an agent of his has been advised of the possibility of such damages.  In no event shall Peter Lewis be liable for any damages, regardless of the form of the claim.  The person using the software bears all risk as to the quality and performance of the software.
  162.  
  163. Ñ Version History
  164.  
  165. Still to think about doing -
  166.  
  167. Convert Fingerd to Control Panel/Init   - Dave White, Chris Price
  168. Have Finger be able to stay in the background, and to bring up the Finger dialog box 
  169.    via a command key combination (a la Suitcase II or SCSIProbe) - Chris Price
  170. Strange "User not found" behavior (I don't print this!) - Ian Hoyle
  171. Write some more PROC resources
  172.    Sydney's finger information server
  173.    Whois server - JQ Johnson
  174.    List of connected users - Robert Beckett
  175.    list of running apps, and which is front - Robert Beckett
  176.    user who is dialed into a machine using Appletalk Remote Access - Robert Beckett
  177.    Clipboard
  178. Handle word breaking to 80 columns - James P. O'Shea III.
  179. Printing doesn't work in MonoFinder for some reason - Albert Smith
  180. Change %LOG to take parameters for what to log (ip, fingered name, time, etc).
  181. Add %OURIP which returns the IP of this mac
  182. Add preference to not close the finger window when the Finger button is pressed.
  183. Save window positions.
  184. Restrict Finger output window to 80 column resizing.
  185. Windows menu.
  186. Saving finger output window.
  187.  
  188. v1.3.7
  189. ~Fixed the mess I made of Fingerd
  190. ~A couple other bug fixes
  191. ~Updated the Email address
  192.  
  193. v1.3.6
  194. ~Fixed incompatibility with AppleScript
  195. ~A couple bug fixes
  196.  
  197. v1.3.5
  198. ~Changed %LOG to put a time stamp in as well.
  199. ~Colourized icons - Thanks to Don Nash for the icons.
  200. ~Fixed it so that the strings which are returned by tokens are translated 7->8
  201. ~Fixed %LOOKUP to not uppercase the line.
  202.  
  203. v1.3.3
  204. ~Added Option-Quit to quit the daemon.
  205. ~Change "Finger" to "Whois" when you click the Whois check box
  206.  
  207. v1.3.1
  208. ~Crash with error 25 when Finger text is selected
  209. ~Should be more difficult to crash with out of memory, though still not impossible.
  210. ~Bug with edit menu selections.
  211. ~Crash with dragging non-fron windows
  212. ~Added in support for the file Translate 7<->8 for foreign character sets.
  213.  
  214. v1.3.0
  215. ~Have setable default for the Finger window.
  216. ~Find a more intuitive way of saving the Finger-> menu.
  217. ~Add a pref to Finger to auto-open the Finger╔ dialog on startup - Tom McDougal
  218. ~Reverse user/machine name?
  219. ~Allow chained fingering (eg root@foo.edu@bar.edu), at least in the client.
  220.  
  221. v1.2.1 Release 3 Dec/91
  222. NOTE: The Finger 1.2.1 release incorrectly included Fingerd 1.1.5. :-(
  223. ~Solved a bug to do with QUIT apple events, that caused Fingerd to crash on shutdown.
  224.  
  225. v1.1.5 Release 2 Dec/91
  226. ~Print cancel button produced an error message - Albert Smith
  227. ~Avoid crashing in MonoFinder systems - JQ Johnson
  228. ~Changed from striping incoming <lf>s, to striping <cr>s, and converting <lf> to <cr>
  229. ~Support Whois query in Finger - JQ Johnson
  230. ~Handle multiple daemon connections under MacTCP 1.1.  The max is specified in STR#=129.  By default the maximum for Finger is 2 daemons, and for Fingerd is 1.
  231. ~Support quit apple event in daemon - Stuart Cheshire.
  232. ~Extend %FILES to return file ? for missing file, and @ for blank user - S. Cheshire
  233. ~Enable the Edit menu, seeing as how it works anyway
  234. ~Find the correct Prefs folder on all systems - Bien amicalement
  235. ~Put port into rsrc fork so it can be easily changed to a whois server - JQ Johnson
  236. ~Handle 7<->8 bit conversions - Ari Ahonen
  237. ~Allow recursive expansion of tokens under tokens like %FILES - Stuart Cheshire.
  238.    More importantly, recursive expansion of <cr> to <cr><lf>! - Ari Ahonen.
  239. ~Handle out of memory a bit more gracefully (like only one OoM dialog) - Brian Kendig.
  240.  
  241. v1.0.6g Interim non-release
  242. ~Fix crash related to low end macs with little memory (stack space problem)
  243.  
  244. v1.0.6 Release 1 Nov/91
  245. -Some sort of edit feature to insert the current time chars - Dave White
  246.    Scrapped due to change from international chars to tokens.
  247.  
  248. v1.0.4 Beta Release 3
  249. ~Make Finger's tokens extensible!
  250. ~Use tokens instead of silly characters.
  251. ~Window opens only after all finger info is read, and a busy cursor is displayed
  252. ~Zoom the window after reading the plan - Robert Beckett
  253.  
  254. v1.0.2 Beta Release 2
  255.  
  256. ~Problems with 6.0.5 and Finger - Rob Trevor
  257. ~Crashes on a SE with System 6.0.4, MacTCP 1.0.2 when you unset the plan check box
  258. ~   - Ian Hoyle
  259. ~Running Finger/Daemon with Fingerd gives sys error 'Fingerd' error type 11
  260. ~   - Chris Price
  261.  
  262. ~1) It would be nice to have a print command to get a hard copy of the
  263. response from a finger query - Greg Webb
  264. ~A "Dial" menu - Rodney Vickers
  265. ~2) I think you should change the cursor to a watch while the query is being
  266. made. At present, the cursor disappears - Greg Webb
  267. [I ShowCursor to make it reappear.  It isn't a watch because Finger isn't locked up]
  268. ~3) Minor point. Under Help, the text says 'Use the Finger menu...' I think
  269. that should read 'Use the Finger command...' or 'Use the Finger command
  270. from the File menu...' - Greg Webb
  271. ~Use other than chicago font in about/help/etc - Danny Thomas
  272. ~Dim the OK button until a reasonably valid machine name is in the dialog box
  273.    - Danny Thomas
  274. ~Dim the check box out until the plan is selected. - Danny Thomas
  275. ~Remember the plan on different volumes (I think I've fixed this) - Quinn
  276.  
  277. v1.0.0 Beta Release 1
  278. ~Bug in TEActivate (Finger @rocky, then finger @twinpeaks, then click OK -> bus err)
  279. ~Increase the 10k mem restriction if the about, help, prefs windows are not open, 
  280.      or finger windows are open. - Grow Zone should fix most mem problems.
  281. ~Fingering yourself doesn't work.  It really shouldn't crash the machine.
  282. ~You should be able to copy out of the Finger windows.
  283. ~Scroll bars.
  284.  
  285.  
  286. Ñ Acknowledgements
  287.  
  288. Thanks go to Quinn&Todd for initial beta testing, and to Rhys for help debugging TCP (fun fun fun!), and generally to DRJQ, the UCC, Curtin, Steve, c.s.m.p, ditmela.oz.au (& Harold), (ftp.)apple.com, Stephen, and anyone who uses Finger/Fingerd!  Special thanks go to those brave souls who risked life and Mac beta testing an unknown program: Oliver, Ian, Paul, Dave, Adrian, Phil, Robin, Rodney, Allan (again!), Chris, Adam, Robert, Rob, Phill, Greg, Alf, Danny and Michael!  Many thanks to JQ Johnson, Stuart Cheshire, Bien amicalement, Ari Ahonen & Brian Kendig who suggested many of the improvements to version 1.0.6.
  289.  
  290. Ñ The Author
  291.  
  292. Programs written by me:
  293. DeHQX 2.0.0 - BinHex decoder (use StuffIt Expander instead).
  294. Finger 1.3.7 - Macintosh Finger client/daemon.
  295. Talk 1.1.1 - Macintosh Talk client/daemon.
  296. Chat 1.1.0 - Multiuser primitive irc-like daemon.
  297. FTPd 2.1.0 - Macintosh FTP server.
  298. ObiWan 4.0.0 - Online help system.
  299. MacBinary II+ 1.0.2 - MacBinary II+ encoder/decoder.
  300. FetchNews 1.0.0b - Fetch News for use with NewsWatcher╒s demo mode.
  301. MacTCP Watcher 1.1.0 - Display MacTCP╒s state information.
  302. Bolo Finder 1.0.2 - Display the results from Mike Ellis' Bolo Tracker.
  303. Bolo RandomMap 1.1.0 - Generate a random map for Bolo.
  304.  
  305. You can get the latest development versions from redback.cs.uwa.edu.au, but please use the major archives for released version if at all possible.  Redback is a long long way from most people, and using it wastes bandwidth on the Australian-US satelite link which is overly congested already.  So use the versions posted to the archives (like sumex-aim.stanford.edu or mac.archive.umich.edu), and only use the development versions if you have some specific problem - in which case tell me!)
  306.  
  307. Send postcards, comments, bug reports, wishes, and payments to:
  308.  
  309. Peter Lewis,
  310. 10 Earlston Way,
  311. Booragoon, Perth, WA, 6154,
  312. AUSTRALIA
  313.  
  314. or by electronic mail to:
  315.  
  316. Internet: peter.lewis@info.curtin.edu.au
  317. Bitnet: peter.lewis%info.curtin.edu.au@cunyvm.bitnet
  318. UUCP: uunet!munnari.oz!info.curtin.edu.au!peter.lewis
  319.  
  320. Alternative addresses (in order from best to worst)
  321. peter@cujo.curtin.edu.au
  322. peter@ncrpda.curtin.edu.au
  323. peter@rocky.curtin.edu.au
  324. peter@ucc.gu.uwa.edu.au
  325.